package com.light.gulimall.product.vo;

import com.light.gulimall.product.entity.AttrEntity;

import java.util.List;
import java.util.Objects;

public class WithAttrVO {

    /**
     * 分组id
     */
    private Long attrGroupId;

    /**
     * 组名
     */
    private String attrGroupName;
    /**
     * 排序
     */
    private Integer sort;
    /**
     * 描述
     */
    private String descript;
    /**
     * 组图标
     */
    private String icon;

    /**
     * 所属分类ID
     */
    private Long catelogId;

    /**
     * 某个所属分类ID下所有的属性
     */
    private List<AttrEntity> attrs;


    public WithAttrVO() {
    }

    public WithAttrVO(Long attrGroupId, String attrGroupName, Integer sort, String descript, String icon, Long catelogId, List<AttrEntity> attrs) {
        this.attrGroupId = attrGroupId;
        this.attrGroupName = attrGroupName;
        this.sort = sort;
        this.descript = descript;
        this.icon = icon;
        this.catelogId = catelogId;
        this.attrs = attrs;
    }

    /**
     * 获取
     * @return attrGroupId
     */
    public Long getAttrGroupId() {
        return attrGroupId;
    }

    /**
     * 设置
     * @param attrGroupId
     */
    public void setAttrGroupId(Long attrGroupId) {
        this.attrGroupId = attrGroupId;
    }

    /**
     * 获取
     * @return attrGroupName
     */
    public String getAttrGroupName() {
        return attrGroupName;
    }

    /**
     * 设置
     * @param attrGroupName
     */
    public void setAttrGroupName(String attrGroupName) {
        this.attrGroupName = attrGroupName;
    }

    /**
     * 获取
     * @return sort
     */
    public Integer getSort() {
        return sort;
    }

    /**
     * 设置
     * @param sort
     */
    public void setSort(Integer sort) {
        this.sort = sort;
    }

    /**
     * 获取
     * @return descript
     */
    public String getDescript() {
        return descript;
    }

    /**
     * 设置
     * @param descript
     */
    public void setDescript(String descript) {
        this.descript = descript;
    }

    /**
     * 获取
     * @return icon
     */
    public String getIcon() {
        return icon;
    }

    /**
     * 设置
     * @param icon
     */
    public void setIcon(String icon) {
        this.icon = icon;
    }

    /**
     * 获取
     * @return catelogId
     */
    public Long getCatelogId() {
        return catelogId;
    }

    /**
     * 设置
     * @param catelogId
     */
    public void setCatelogId(Long catelogId) {
        this.catelogId = catelogId;
    }

    /**
     * 获取
     * @return attrs
     */
    public List<AttrEntity> getAttrs() {
        return attrs;
    }

    /**
     * 设置
     * @param attrs
     */
    public void setAttrs(List<AttrEntity> attrs) {
        this.attrs = attrs;
    }

    public String toString() {
        return "WithAttrVO{attrGroupId = " + attrGroupId + ", attrGroupName = " + attrGroupName + ", sort = " + sort + ", descript = " + descript + ", icon = " + icon + ", catelogId = " + catelogId + ", attrs = " + attrs + "}";
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WithAttrVO that = (WithAttrVO) o;
        return Objects.equals(attrGroupId, that.attrGroupId) && Objects.equals(attrGroupName, that.attrGroupName) && Objects.equals(sort, that.sort) && Objects.equals(descript, that.descript) && Objects.equals(icon, that.icon) && Objects.equals(catelogId, that.catelogId) && Objects.equals(attrs, that.attrs);
    }

    @Override
    public int hashCode() {
        return Objects.hash(attrGroupId, attrGroupName, sort, descript, icon, catelogId, attrs);
    }
}
